/*
 * @Description: 资源提供方
 * @Author: iamsmiling
 * @Date: 2021-06-06 11:47:26
 * @LastEditTime: 2021-06-15 11:12:16
 */

import 'package:credit_business_circle/R/R.dart';
import 'package:credit_business_circle/pages/publish_square/children/publish_center/widget/text_field_label_tip.dart';
import 'package:credit_business_circle/routes/app_routes.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';

class SourceProviderFormCard extends StatelessWidget {
  const SourceProviderFormCard({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      margin: EdgeInsets.all(R.dimen.dp10),
      padding: EdgeInsets.symmetric(
          vertical: R.dimen.dp22, horizontal: R.dimen.dp10),
      decoration: BoxDecoration(
          color: R.color.ffffffff,
          borderRadius: BorderRadius.circular(R.dimen.sp5)),
      child: Column(
        crossAxisAlignment: CrossAxisAlignment.start,
        children: [
          TextFieldLableTip(
            label: "提供资源",
          ),
          Container(
            margin: EdgeInsets.only(top: R.dimen.dp12, bottom: R.dimen.dp20),
            padding: EdgeInsets.all(R.dimen.dp12),
            decoration:
                BoxDecoration(border: Border.all(color: R.color.ffcccccc)),
            child: TextFormField(
              maxLines: 8,
              decoration: InputDecoration(
                  hintText:
                      "填写合作描述及我能提供的资源内容，限20行\n例：\n 1、推广的产品及介绍\n 2、推广单价..."),
            ),
          ),
          Row(
            mainAxisAlignment: MainAxisAlignment.spaceBetween,
            children: [
              Text(
                "关键字标签",
                style: TextStyle(fontSize: R.dimen.sp13),
              ),
              GestureDetector(
                onTap: () => Get.toNamed(Get.currentRoute + AppRoutes.addTag),
                child: Image.asset(R.image.addTag),
              )
            ],
          ),
          Container(
            margin: EdgeInsets.only(top: R.dimen.dp20),
            child: Wrap(
              spacing: R.dimen.dp8,
              runSpacing: R.dimen.dp8,
              children: List.generate(
                  8,
                  (index) => Container(
                        padding: EdgeInsets.symmetric(
                            horizontal: R.dimen.dp9, vertical: R.dimen.dp6),
                        decoration: BoxDecoration(
                            color: R.color.fff1f1f1,
                            borderRadius: BorderRadius.circular(R.dimen.sp3)),
                        child: Text(
                          "场地资源",
                          style: TextStyle(
                              fontSize: R.dimen.sp13, color: R.color.ff666666),
                        ),
                      )),
            ),
          )
        ],
      ),
    );
  }
}
